<?php
    class equip{
    	private $nom;
		private $categoria;
		private $participants;
		private $restriccions;
		
		public function __constructor(){
		}
		
		public function setDadesBasic($nom, $cat, $n_dies){
			$this->nom = $nom;
			$this->categoria = $cat;
			
			$this->restriccions = array();
			for ($i=0; $i < $n_dies; $i++) { 
				$this->restriccions[$i] = array();
				for ($j=0; $j < 3; $j++) { 
					$this->restriccions[$i][$j] = FALSE;
				}
			}
		}
		
		public function getCat(){
			return $this->categoria;
		}
		
		public function getNom(){
			return $this->nom;
		}
		
		public function addParticipant($part){
			$this->participants[] = $part;

		}
		
		public function setRes($rest){
			for ($i=0; $i < sizeof($rest); $i++) { 
				for ($j=0; $j < 3; $j++) { 
					if($rest[$i][$j])	$this->restriccions[$i][$j] = TRUE;
				}
			}
		}
		
		public function getPart(){
			return $this->participants;
		}
		
		public function getNumPart(){
			return sizeof($this->participants);
		}
		
		public function getRes(){
			return $this->restriccions;
		}
		
    }
?>